import request from '@/utils/request'

// 查询设备连接列表
export function listConnection(query) {
    return request({
        url: '/equipment/connection/list',
        method: 'get',
        params: query
    })
}
// 设备连接列表下拉数据
export function optionselectConnection() {
    return request({
        url: '/equipment/connection/optionselect',
        method: 'get'
    })
}
// 查询设备连接详细
export function getConnection(equipmentConnectionId) {
    return request({
        url: '/equipment/connection/' + equipmentConnectionId,
        method: 'get'
    })
}

// 新增设备连接
export function addConnection(data) {
    return request({
        url: '/equipment/connection',
        method: 'post',
        data: data
    })
}
// 测试设备连接
export function testConnection(data) {
    return request({
        url: '/equipment/connection/test',
        method: 'post',
        data: data
    })
}
// 修改设备连接
export function updateConnection(data) {
    return request({
        url: '/equipment/connection',
        method: 'put',
        data: data
    })
}

// 删除设备连接
export function delConnection(equipmentConnectionId) {
    return request({
        url: '/equipment/connection/' + equipmentConnectionId,
        method: 'delete'
    })
}
